<template>
<div>
    <h1>登录页</h1>
    用户名<input type="text" v-model="username">
    密码<input type="text" v-model="password">
    <button @click="llogin()">登录</button>
  <a href="https://api.weibo.com/oauth2/authorize?client_id=1352802244&redirect_uri=http://127.0.0.1:8080/jinweibo">微博三方登录</a>
</div>
  
</template>

<script>
import axios from 'axios'
export default {
  data() {
    return {
      username:"",
      password:""
    }
  },methods: {
    llogin(){
      var data={
        username:this.username,
        password:this.password,
      }
      axios({
        url:"http://127.0.0.1:8000/login",
        method:"post",
        data:data
      }).then(resp=>{
        console.log(resp)
        alert("登录成功")
      })
    }
  },
}
</script>

<style>

</style>